Optimal. Leaf size=35 \[ \frac {B \sec (e+f x)}{a c f}+\frac {A \tan (e+f x)}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3046, 2748,
3852, 8} \begin {gather*} \frac {A \tan (e+f x)}{a c f}+\frac {B \sec (e+f x)}{a c f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2748
Rule 3046
Rule 3852
Rubi steps
\begin {align*} \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))} \, dx &=\frac {\int \sec ^2(e+f x) (A+B \sin (e+f x)) \, dx}{a c}\\ &=\frac {B \sec (e+f x)}{a c f}+\frac {A \int \sec ^2(e+f x) \, dx}{a c}\\ &=\frac {B \sec (e+f x)}{a c f}-\frac {A \text {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{a c f}\\ &=\frac {B \sec (e+f x)}{a c f}+\frac {A \tan (e+f x)}{a c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 35, normalized size = 1.00 \begin {gather*} \frac {B \sec (e+f x)}{a c f}+\frac {A \tan (e+f x)}{a c f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 57, normalized size = 1.63
method | result | size |
risch | \(\frac {2 i A +2 B \,{\mathrm e}^{i \left (f x +e \right )}}{\left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) a c f}\) | \(56\) |
derivativedivides | \(\frac {-\frac {2 \left (\frac {A}{2}+\frac {B}{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\frac {2 \left (\frac {A}{2}-\frac {B}{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a c f}\) | \(57\) |
default | \(\frac {-\frac {2 \left (\frac {A}{2}+\frac {B}{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\frac {2 \left (\frac {A}{2}-\frac {B}{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a c f}\) | \(57\) |
norman | \(\frac {-\frac {2 B}{a c f}-\frac {2 A \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a c f}-\frac {2 A \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a c f}-\frac {2 B \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a c f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(123\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 37, normalized size = 1.06 \begin {gather*} \frac {\frac {A \tan \left (f x + e\right )}{a c} + \frac {B}{a c \cos \left (f x + e\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 30, normalized size = 0.86 \begin {gather*} \frac {A \sin \left (f x + e\right ) + B}{a c f \cos \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs.
\(2 (26) = 52\).
time = 0.80, size = 83, normalized size = 2.37 \begin {gather*} \begin {cases} - \frac {2 A \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - a c f} - \frac {2 B}{a c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - a c f} & \text {for}\: f \neq 0 \\\frac {x \left (A + B \sin {\left (e \right )}\right )}{\left (a \sin {\left (e \right )} + a\right ) \left (- c \sin {\left (e \right )} + c\right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 41, normalized size = 1.17 \begin {gather*} -\frac {2 \, {\left (A \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + B\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a c f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.55, size = 39, normalized size = 1.11 \begin {gather*} -\frac {2\,\left (B+A\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{a\,c\,f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________